package com.java.controller.admin;


import com.java.pojo.entity.UserLoginRecord;
import com.java.result.Result;
import com.java.service.UserLoginRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 用户登录记录表 前端控制器
 * </p>
 *
 * @author Helen
 * @since 2021-07-08
 */

@Api("日志管理")
@RestController
@RequestMapping("/admin/core/userLoginRecord")
public class AdminUserLoginRecordController {

    @Resource
    private UserLoginRecordService userLoginRecordService;

    @ApiOperation("日志")
    @GetMapping("/getLoginRecord/{userId}")
    public Result getLoginRecord(@PathVariable Integer userId){
        List<UserLoginRecord> list = userLoginRecordService.getLoginRecord(userId);
        return Result.ok(list);
    }

}

